//
//  YSRequestManager.h
//  Pods
//
//  Created by zhanglu on 16/3/3.
//
//

#import "YSRequest.h"
#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN
@interface YSRequestManager : NSObject

@property (nonatomic, assign) NSInteger maxConcurrentOperationCount;
@property (nonatomic, strong, readonly) AFHTTPSessionManager * manager;

+ (instancetype)manager;
- (void)cancelRequest:(YSRequest *)request;
- (void)cancelAllRequests;
- (void)sendWithRequest:(YSRequest *)request
                 success: (void(^)(id response)) success
                 failure: (void(^)(YSRequest * request)) failure;

@end
NS_ASSUME_NONNULL_END
